const labels = require('../../modules/labels')

module.exports = (req, res) => {
  if (!req.query.user_id || !req.query.user_name) {
    return res.status(200).json({msg: '参数错误',code: 400})
  }

  labels.getLabels(req.query).then(suc => {
    return res.status(200).json({data: suc, code: 200})
  }).catch(err => {
    console.log(err)
    return res.status(200).json({msg: '服务器返回错误，请稍后重试', code: 500})
  })

}